home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 5_2007-2008.ISO / data / Zips / Pharmacy_22101822142008.psc / Pharmacy / Active Code Generater / Form1.frm next >
Text File  |  2007-05-27  |  3KB  |  111 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "Pharmacy Active Code Creater"
  5.    ClientHeight    =   4095
  6.    ClientLeft      =   45
  7.    ClientTop       =   435
  8.    ClientWidth     =   6690
  9.    ControlBox      =   0   'False
  10.    LinkTopic       =   "Form1"
  11.    MaxButton       =   0   'False
  12.    MinButton       =   0   'False
  13.    ScaleHeight     =   4095
  14.    ScaleWidth      =   6690
  15.    StartUpPosition =   2  'CenterScreen
  16.    Begin VB.CommandButton Command2 
  17.       Caption         =   "Exit"
  18.       Height          =   615
  19.       Left            =   120
  20.       TabIndex        =   3
  21.       Top             =   3360
  22.       Width           =   6495
  23.    End
  24.    Begin VB.CommandButton Command1 
  25.       Caption         =   "Generate My Active Code"
  26.       Height          =   615
  27.       Left            =   120
  28.       TabIndex        =   2
  29.       Top             =   2640
  30.       Width           =   6495
  31.    End
  32.    Begin VB.TextBox Text2 
  33.       Alignment       =   2  'Center
  34.       BeginProperty Font 
  35.          Name            =   "MS Sans Serif"
  36.          Size            =   18
  37.          Charset         =   178
  38.          Weight          =   700
  39.          Underline       =   0   'False
  40.          Italic          =   0   'False
  41.          Strikethrough   =   0   'False
  42.       EndProperty
  43.       Height          =   975
  44.       Left            =   120
  45.       TabIndex        =   1
  46.       Text            =   "31032156465461321564987"
  47.       Top             =   1560
  48.       Width           =   6495
  49.    End
  50.    Begin VB.TextBox Text1 
  51.       Alignment       =   2  'Center
  52.       BeginProperty Font 
  53.          Name            =   "MS Sans Serif"
  54.          Size            =   18
  55.          Charset         =   178
  56.          Weight          =   700
  57.          Underline       =   0   'False
  58.          Italic          =   0   'False
  59.          Strikethrough   =   0   'False
  60.       EndProperty
  61.       Height          =   855
  62.       Left            =   120
  63.       TabIndex        =   0
  64.       Text            =   "Enter_Client_Code_Here"
  65.       Top             =   600
  66.       Width           =   6495
  67.    End
  68.    Begin VB.Label Label1 
  69.       Alignment       =   2  'Center
  70.       Caption         =   "╚╙π ╟ßßσ ╟ß╤═πΣ ╟ß╤═φπ"
  71.       Height          =   255
  72.       Left            =   240
  73.       TabIndex        =   4
  74.       Top             =   120
  75.       Width           =   6255
  76.    End
  77. End
  78. Attribute VB_Name = "Form1"
  79. Attribute VB_GlobalNameSpace = False
  80. Attribute VB_Creatable = False
  81. Attribute VB_PredeclaredId = True
  82. Attribute VB_Exposed = False
  83. Private Sub Command1_Click()
  84. On Error Resume Next
  85. getactive (Text1.Text)
  86.  
  87. End Sub
  88.  
  89. Private Sub Command2_Click()
  90. End
  91.  
  92. End Sub
  93.  
  94. Public Function getactive(ByVal sn As Long)
  95. On Error Resume Next
  96. Dim ac As String
  97. Dim X, Y, z As Double
  98. Dim logx, logy, logz As Double
  99. Dim res1 As Double
  100. X = Mid(sn, 1, 2)
  101. Y = Mid(sn, 3, 6)
  102. z = Right(sn, 3)
  103. logx = Log(X)
  104. logy = Log(Y)
  105. logz = Log(z)
  106. res1 = CLng(logx) * CLng(logy) * CLng(logz) * (CLng(logx) / 2) + 1
  107. ac = (res1 * 8254) + 4445
  108. Text2.Text = ac
  109. End Function
  110.  
  111.